//
//  SrnTeacherAppDelegate.h
//  SrnTeacher
// http://developer.apple.com/iphone/library/documentation/Xcode/Conceptual/iphone_development/145-Publishing_Applications_for_Testing/user_testing.html#//apple_ref/doc/uid/TP40007959-CH10-SW2
//  Created by iDeneb on 11/21/09.
//  Copyright __MyCompanyName__ 2009. All rights reserved.
//

#import <CoreFoundation/CoreFoundation.h>
#import <UIKit/UIKit.h>
#import "db.h"

@class AsyncSocket;
@class SwitchViewController;

@interface SrnTeacherAppDelegate : NSObject <UIApplicationDelegate> {
	AsyncSocket *listenSocket;
	NSMutableArray *connectedSockets;
	NSMutableArray *listOfItems;
	NSMutableArray *listOfAllUsers;
	NSString *ipaddress;
	int port;
	int userCount;
	int userLimit;
	BOOL isRunning;
	
    IBOutlet UIWindow *window;
	IBOutlet SwitchViewController *viewController;
	IBOutlet UITabBarController *tabBarController;
	db *udb;
	int currid;
	BOOL isNew;
	BOOL isOpen;
	BOOL isHide;
	BOOL isShow;
	BOOL isClose;
}

- (BOOL)startStop:(id)sender;
-(IBAction)resultsClicked:(id)sender;

@property (nonatomic, retain) IBOutlet UITabBarController *tabBarController;
@property (nonatomic, retain)  UIWindow *window;
@property (nonatomic, retain)  SwitchViewController *viewController;
@property (nonatomic, retain)  AsyncSocket *listenSocket;
@property (nonatomic, retain)  NSString *ipaddress;
@property (nonatomic, retain)  NSMutableArray *listOfItems;
@property (nonatomic, retain)  NSMutableArray *listOfAllUsers;
@property (nonatomic, retain)  db *udb;
@property (nonatomic) int currid;
@property (nonatomic) BOOL isNew;
@property (nonatomic) BOOL isOpen;
@property (nonatomic) BOOL isHide;
@property (nonatomic) BOOL isShow;
@property (nonatomic) BOOL isClose;
+(SrnTeacherAppDelegate *)App;


- (void) applicationDidFinishLaunching: (UIApplication *) application;
- (void) setPort:(int) listenport;
- (void) setUserCount:(int) userCount;
- (void) setUserLimit:(int) count;

- (int) port;
- (int) userCount;
- (int) userLimit;

@end

